﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Newtonsoft.Json;

public partial class _Gg : Basic
{
    public string strHYGGZF = "";  //行业个股涨幅
    public string strDQZF = "";  //地区版块
    public string strGPYS = "";  //股票医生
    public string strZSPG = "";  //走势评估
    public string strTZPJ = "";  //投资评级
    public string strGLBK = "";  //关联版块
    public string strHYXW = "";  //行业新闻
    public string strGGXW = "";  //个股新闻
    public string strDPTJ = "";  //道破天机
    public string strGSGK = "";  //公司概况
    public string code = "600000";
    public string dqCode = "";
    public string hyCode = "";
    public int cTime = 10;  //当前几点钟
    protected void Page_Load(object sender, EventArgs e)
    {
        code = OTO.ToStr(Request["code"], "600000");

        cTime = DateTime.Now.Hour;

        if (OTO.IsSCode(code) == false)
        {
            Response.Write("<script>alert(\"请不要进行非法操作！\");this.location.href='/';</script>");
            Response.End();
        }

        List<StockEnty> list = Stocks.GetStock().Where(x => x.stock == code).ToList();
        if (list.Count < 1)
        {
            Response.Write("<script>alert(\"请不要进行非法操作！\");</script>");
            Response.End();
        }
        string _Name = list[0].name;

        GetBkCode(code, out hyCode, out dqCode);

        strGSGK = sb公司概况(code).ToString();

        strHYGGZF = sb行业个股涨幅(code).ToString();

        strDQZF = sb地区版块(code).ToString();

        strGPYS = sb股票医生(code).ToString();

        strZSPG = sb走势评估(code).ToString();

        strTZPJ = sb投资评级(code).ToString();

        strGLBK = sb关联版块(code).ToString();

        strHYXW = sb行业新闻(code).ToString();

        strGGXW = sb个股新闻(code).ToString();

        strDPTJ = sb道破天机(code).ToString();

        _title = _Name + "(" + code + ")-股票行情分析_资金流向_行业分析_益盟操盘手";
        _keywords = string.Format("{0}（{1}),{0}行情，{0}股票，{1}行情股票行情分析，资金流向_益盟操盘手", _Name, code);
        _desc = string.Format("益盟操盘手为您提供{0}（{1}）实时股票行情分析，{0}（{1}）行业资讯，资金流向，公司年报，{0}（{1}）财务数据、操作建议等，成为您身边的决策师_益盟操盘手", _Name, code);
        BasicHeader(_title, string.Empty, string.Empty, _desc, _keywords);

    }

    /// <summary>
    /// 根据个股code 返回个股所在的行业板块和地区板块code
    /// </summary>
    /// <param name="code"></param>
    /// <param name="hy"></param>
    /// <param name="dq"></param>
    protected void GetBkCode(string code, out string hy, out string dq)
    {
        hy = "";
        dq = "";
        try
        {
            BkByCode obj = JsonConvert.DeserializeObject<BkByCode>(Pub.LoadData(jsonUrl + "stock/GetBkIdByStockId.ashx?code=" + code));
            if (obj.hy.Count > 0)
                hy = obj.hy[0];
            if (obj.dq.Count > 0)
                dq = obj.dq[0];
        }
        catch { }
    }

    protected StringBuilder sb行业个股涨幅(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            List<GgEnty01> list = JsonConvert.DeserializeObject<List<GgEnty01>>(Pub.LoadData(jsonUrl + "hangqing/hyggzf.ashx?stockid=" + code));

            sb.AppendLine("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">");
            sb.AppendLine("  <tr class=\"tableSmall1Head\">");
            sb.AppendLine("    <td class=\"gray\">股票名称</td>");
            sb.AppendLine("    <td class=\"gray\">涨跌幅</td>");
            sb.AppendLine("    <td class=\"gray\" width=\"58\" align=\"center\">操盘线</td>");
            sb.AppendLine("  </tr>");
            int i = 0;
            list = list.Take(10).ToList();
            foreach (var m in list)
            {
                i++;
                string _class = " class=\"bgGray\"";
                if (i % 2 == 0)
                    _class = "";
                sb.AppendFormat("  <tr {0}>", _class);
                sb.AppendFormat("    <td><a href=\"Gg{1}.shtml\" class=\"b\">{0}</a></td>", m.N, m.C);
                sb.AppendFormat("    <td class=\"red\">{0}</td>", OTO.PerRedGre(m.F, 1, 2, "-", "%"));
                sb.AppendFormat("    <td class=\"{1}\" align=\"center\" title=\"{2}\">{0}</td>", Math.Abs(m.NC), m.NC < 0 ? "bg_tipG" : "bg_tipR", Pub.NcTip(m.NC));
                sb.AppendLine("  </tr>");
            }
            sb.AppendLine("</table>");
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    protected StringBuilder sb关联版块(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            List<GgEnty01> list = JsonConvert.DeserializeObject<List<GgEnty01>>(Pub.LoadData(jsonUrl + "hangqing/glbk.ashx?stockid=" + code));

            sb.AppendLine("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">");
            sb.AppendLine("  <tr class=\"tableSmall1Head\">");
            sb.AppendLine("    <td class=\"gray\">板块名称</td>");
            sb.AppendLine("    <td class=\"gray\">涨跌幅</td>");
            sb.AppendLine("    <td class=\"gray\" width=\"58\" align=\"center\">操盘线</td>");
            sb.AppendLine("  </tr>");
            int i = 0;
            list = list.Take(10).ToList();
            foreach (var m in list)
            {
                i++;
                string _class = " class=\"bgGray\"";
                if (i % 2 == 0)
                    _class = "";
                sb.AppendFormat("  <tr {0}>", _class);
                if (m.C.Substring(0, 3) == "002")
                    sb.AppendFormat("    <td><a href=\"Bk{1}.shtml\" class=\"b\">{0}</a></td>", m.N, m.C);
                else
                    sb.AppendFormat("    <td><span class=\"blue\">{0}</span></td>", m.N);
                sb.AppendFormat("    <td class=\"red\">{0}</td>", OTO.PerRedGre(m.F, 1, 2, "-", "%"));
                sb.AppendFormat("    <td class=\"{1}\" align=\"center\" title=\"{2}\">{0}</td>", Math.Abs(m.NC), m.NC < 0 ? "bg_tipG" : "bg_tipR", Pub.NcTip(m.NC));
                sb.AppendLine("  </tr>");
            }
            sb.AppendLine("</table>");
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    protected StringBuilder sb地区版块(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            GgEnty02 obj = JsonConvert.DeserializeObject<GgEnty02>(Pub.LoadData(jsonUrl + "hangqing/dqbkxggp.ashx?stockid=" + code));

            if (obj != null)
            {
                sb.AppendFormat("<div class=\"index_content_h1 h3 gray_t\">{0}", obj.name);
                sb.AppendFormat("  <div class=\"more font12\"><a href=\"ggph.aspx?bkcode={0}\">更多</a></div>", dqCode);
                sb.AppendLine("</div>");
                sb.AppendLine("<div class=\"tableSmall1\">");

                sb.AppendLine("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">");
                sb.AppendLine("  <tr class=\"tableSmall1Head\">");
                sb.AppendLine("    <td class=\"gray\">股票名称</td>");
                sb.AppendLine("    <td class=\"gray\">涨跌幅</td>");
                sb.AppendLine("    <td class=\"gray\" width=\"58\" align=\"center\">操盘线</td>");
                sb.AppendLine("  </tr>");
                int i = 0;
                foreach (var m in obj.lst)
                {
                    i++;
                    string _class = " class=\"bgGray\"";
                    if (i % 2 == 0)
                        _class = "";
                    sb.AppendFormat("  <tr {0}>", _class);
                    sb.AppendFormat("    <td><a href=\"Gg{1}.shtml\" class=\"b\">{0}</a></td>", m.N, m.C);
                    sb.AppendFormat("    <td class=\"red\">{0}</td>", OTO.PerRedGre(m.F, 1, 2, "-", "%"));
                    sb.AppendFormat("    <td class=\"{1}\" align=\"center\" title=\"{2}\">{0}</td>", Math.Abs(m.NC), m.NC < 0 ? "bg_tipG" : "bg_tipR", Pub.NcTip(m.NC));
                    sb.AppendLine("  </tr>");
                }
                sb.AppendLine("</table>");
                sb.AppendLine("</div>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    protected StringBuilder sb股票医生(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            StockScore obj = JsonConvert.DeserializeObject<StockScore>(Pub.LoadData(jsonUrl + "hangqing/StockScore.ashx?stockid=" + code));

            if (obj != null)
            {
                sb.AppendLine("<ul>");
                sb.AppendFormat("  <li class=\"top\"><img src=\"images/pic_leida.jpg\" align=\"left\" vspace=\"8\" hspace=\"10\" alt=\"雷达\" /><span class=\"font-weight\">体检总分：</span><span class=\"font35 font-weight red\"><em>{0}</em></span>分<br />", OTO.CoUt(obj.TotalScore, 1, "-", 0));
                sb.AppendFormat("    {0}</li>", obj.TotalDesc);
                sb.AppendLine("  <li>");
                sb.AppendLine("    <div class=\"stockD_score\"><span class=\"font-weight gray_t\">行业地位：</span><br />");
                sb.AppendFormat("      <span class=\"font30 font-weight red\"><em>{0}</em></span> 分</div>", OTO.CoUt(obj.IndustryScore, 1, "-", 0));
                sb.AppendFormat("    <div class=\"stockD_comment gray\">{0}</div>", obj.IndustryDesc);
                sb.AppendLine("  </li>");
                sb.AppendLine("  <li>");
                sb.AppendLine("    <div class=\"stockD_score\"><span class=\"font-weight gray_t\">财务研究：</span><br />");
                sb.AppendFormat("      <span class=\"font30 font-weight red\"><em>{0}</em></span> 分</div>", OTO.CoUt(obj.BasicScore, 1, "-", 0));
                sb.AppendFormat("    <div class=\"stockD_comment gray\">{0}</div>", obj.BasicDesc);
                sb.AppendLine("  </li>");
                sb.AppendLine("  <li>");
                sb.AppendLine("    <div class=\"stockD_score\"><span class=\"font-weight gray_t\">消息评测：</span><br />");
                sb.AppendFormat("      <span class=\"font30 font-weight red\"><em>{0}</em></span> 分</div>", OTO.CoUt(obj.MsgScore, 1, "-", 0));
                sb.AppendFormat("    <div class=\"stockD_comment gray\">{0}</div>", obj.MajorDesc);
                sb.AppendLine("  </li>");
                sb.AppendLine("  <li>");
                sb.AppendLine("    <div class=\"stockD_score\"><span class=\"font-weight gray_t\">机构动态：</span><br />");
                sb.AppendFormat("      <span class=\"font30 font-weight red\"><em>{0}</em></span> 分</div>", OTO.CoUt(obj.MajorScore, 1, "-", 0));
                sb.AppendFormat("    <div class=\"stockD_comment gray\">{0}</div>", obj.MajorDesc);
                sb.AppendLine("  </li>");
                sb.AppendLine("  <li class=\"bottom\">");
                sb.AppendLine("    <div class=\"stockD_score\"><span class=\"font-weight gray_t\">技术分析：</span><br />");
                sb.AppendFormat("      <span class=\"font30 font-weight red\"><em>{0}</em></span> 分</div>", OTO.CoUt(obj.TechScore, 1, "-", 0));
                sb.AppendFormat("    <div class=\"stockD_comment gray\">{0}</div>", obj.TechDetail);
                sb.AppendLine("  </li>");
                sb.AppendLine("</ul>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    protected StringBuilder sb走势评估(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            GG_ZSPGEnty obj = JsonConvert.DeserializeObject<GG_ZSPGEnty>(Pub.LoadData(jsonUrl + "hangqing/zspg.ashx?code=" + code));

            if (obj != null)
            {
                sb.Append("<div class=\"index_content_h h3 red\">走势评估：</div>");
                sb.AppendLine("<div class=\"dp_analysis\">");
                sb.AppendLine("<ul>");
                sb.AppendFormat("  <li><span class=\"white\">趋势状态</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{0}</li>", OTO.ToStr(obj.趋势状态));
                sb.AppendFormat("  <li><span class=\"white\">K线形态</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{0}</li>", OTO.ToStr(obj.K线形态));
                sb.AppendFormat("  <li><span class=\"white\">成交量能</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{0}</li>", OTO.ToStr(obj.成交量能));
                sb.AppendFormat("  <li><span class=\"white\">相对强弱</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{0}</li>", OTO.ToStr(obj.相对强弱));
                sb.AppendFormat("  <li><span class=\"white\">资金流向</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{0}</li>", OTO.ToStr(obj.资金流向));
                sb.AppendLine("</ul>");
                sb.AppendLine("</div>");
            }
            else
            {
                sb.Append("<div class=\"index_content_h h3 red\">走势评估：</div>");
                sb.AppendLine("<div class=\"dp_analysis\">");
                sb.AppendLine("<ul>");
                sb.AppendFormat("  <li><span class=\"white\">趋势状态</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append</li>");
                sb.AppendFormat("  <li><span class=\"white\">K线形态</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append</li>");
                sb.AppendFormat("  <li><span class=\"white\">成交量能</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append</li>");
                sb.AppendFormat("  <li><span class=\"white\">相对强弱</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append</li>");
                sb.AppendFormat("  <li><span class=\"white\">资金流向</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append</li>");
                sb.AppendLine("</ul>");
                sb.AppendLine("</div>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    /// <summary>
    /// 走势评估星级
    /// </summary>
    /// <param name="v"></param>
    /// <returns></returns>
    protected string PgXX(int v)
    {
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < 5; i++)
        {
            if (i <= v)
                sb.Append("<img src=\"images/star.png\" />");
            else
                sb.Append("<img src=\"images/star1.png\" />");
        }

        return sb.ToString();
    }

    protected StringBuilder sb投资评级(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            List<TZPJEnty> obj = JsonConvert.DeserializeObject<List<TZPJEnty>>(Pub.LoadData(jsonUrl + "hangqing/tzpj.ashx?stockid=" + code));

            if (obj != null)
            {
                sb.AppendLine("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">");
                sb.AppendLine("  <tr class=\"tableSmallHead\">");
                sb.AppendLine("    <td class=\"gray\">时间段</td>");
                sb.AppendLine("    <td class=\"gray\">综合评级</td>");
                sb.AppendLine("    <td class=\"gray\">综合评级指数</td>");
                sb.AppendLine("    <td class=\"gray\">买入</td>");
                sb.AppendLine("    <td class=\"gray\">增持</td>");
                sb.AppendLine("    <td class=\"gray\">中性</td>");
                sb.AppendLine("    <td class=\"gray\">减持</td>");
                sb.AppendLine("    <td class=\"gray\">卖出</td>");
                sb.AppendLine("  </tr>");
                int i = 0;
                foreach (var m in obj)
                {
                    i++;
                    string _class = "class=\"bgGray\"";
                    if ((i % 2) == 0)
                        _class = "";
                    sb.AppendFormat("  <tr {0}>", _class);
                    sb.AppendFormat("    <td>{0}</td>", m.时间段);
                    sb.AppendFormat("    <td>{0}</td>", m.综合评级);
                    sb.AppendFormat("    <td>{0}</td>", m.综合评级指数);
                    sb.AppendFormat("    <td>{0}</td>", m.买入);
                    sb.AppendFormat("    <td>{0}</td>", m.增持);
                    sb.AppendFormat("    <td>{0}</td>", m.中性);
                    sb.AppendFormat("    <td>{0}</td>", m.减持);
                    sb.AppendFormat("    <td>{0}</td>", m.卖出);
                    sb.AppendLine("  </tr>");
                }
                sb.AppendLine("</table>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;

    }

    public StringBuilder sb行业新闻(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            string str = Pub.LoadData(jsonUrl + "news/bkRelateNews.ashx?stockid=" + code);
            List<NewsEnty> list = JsonConvert.DeserializeObject<List<NewsEnty>>(str);

            if (list.Count > 0)
            {
                sb.AppendLine("<ul>");
                int len = 6;
                if (list.Count < 6)
                    len = list.Count;
                for (int i = 0; i < len; i++)
                {
                    sb.AppendFormat("<li>·<a href=\"{1}\" target=\"_blank\">{0}</a></li>", list[i].Title, GetNewsUrl("13", "0305", list[i].Id));
                }
                sb.AppendLine("</ul>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    public StringBuilder sb个股新闻(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            string str = Pub.LoadData(jsonUrl + "news/StockRelateNewsList2.ashx?stockid=" + code);
            List<NewsEnty> list = JsonConvert.DeserializeObject<List<NewsEnty>>(str);

            if (list.Count > 0)
            {
                sb.AppendLine("<ul>");
                int len = 5;
                if (list.Count < 5)
                    len = list.Count;
                for (int i = 0; i < len; i++)
                {
                    sb.AppendFormat("<li>·<a href=\"{1}\" target=\"_blank\">{0}</a></li>", list[i].Title, GetNewsUrl("13", "0305", list[i].Id));
                }
                sb.AppendLine("</ul>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    public StringBuilder sb道破天机(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            string str = Pub.LoadData(jsonUrl + "comm/dptj.ashx?stockid=" + code);
            LaybareSecret obj = JsonConvert.DeserializeObject<LaybareSecret>(str);

            sb.AppendLine("<div class=\"index_content_h h3 gray_t\"><img src=\"images/index_ico2.gif\" class=\"img\" />机构持股统计<span class=\"font12 fw_normal\"></span>");
            sb.AppendFormat(" <div class=\"more font12\">本期报告时间：{0}</div>", OTO.ToDate(obj.Date, "M月d日", "-"));
            sb.AppendLine(" </div>");
            sb.AppendLine("<div class=\"gg_l4_l_c\">");
            sb.AppendLine("<table width=\"403\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
            sb.AppendLine("  <tr>");
            sb.AppendFormat("	<td class=\"right\">持股市值万元</td><td>{0}</td>", OTO.PerRedGre(obj.Hold_Marketvalue, 2, "-", ""));
            sb.AppendFormat("	<td class=\"right\">持股数量(万股)</td><td>{0}</td>", OTO.PerRedGre(obj.Hold_num, 2, "-", ""));
            sb.AppendLine("  </tr>");
            sb.AppendLine("  <tr>");
            sb.AppendFormat("	<td class=\"right\">占流通盘比例(%)</td><td>{0}</td>", OTO.PerRedGre(obj.Flow_rate, 2, "-", "%"));
            sb.AppendFormat("	<td class=\"right\">占总股本比例(%)</td><td>{0}</td>", OTO.PerRedGre(obj.Total_rate, 2, "-", "%"));
            sb.AppendLine("  </tr>");
            sb.AppendLine("  <tr>");
            sb.AppendFormat("	<td class=\"right\">基金家数</td><td>{0}</td>", OTO.PerRedGre(obj.Fund_num, 0, "-", ""));
            sb.AppendFormat("	<td class=\"right\">增减比例(%)</td><td>{0}</td>", OTO.PerRedGre(obj.Change_rate, 2, "-", "%"));
            sb.AppendLine("  </tr>");
            sb.AppendLine("  <tr>");
            sb.AppendFormat("	<td class=\"right\">基金增减家数</td><td>{0}</td>", OTO.PerRedGre(obj.Fundchange_num, 0, "-", ""));
            sb.AppendFormat("	<td class=\"right\">增减数量(万股)</td><td>{0}</td>", OTO.PerRedGre(obj.Change_num, 0, "-", ""));
            sb.AppendLine("  </tr>");
            sb.AppendLine("  <tr>");
            sb.AppendFormat("	<td class=\"right\">基金上期持股数量</td><td>{0}</td>", OTO.PerRedGre(obj.Lasthold_num, 0, "-", ""));
            sb.AppendLine("	<td class=\"right\">&nbsp;</td>");
            sb.AppendLine("  </tr>");
            sb.AppendLine("</table>");
            sb.AppendLine("</div>");
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }

    public StringBuilder sb公司概况(string code)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            string str = Pub.LoadData(jsonUrl + "comm/CompanyOverviewhanlder.ashx?stockid=" + code);
            CompanyOverview obj = JsonConvert.DeserializeObject<CompanyOverview>(str);
            if (obj != null)
            {
                sb.AppendLine("<div class=\"index_content_h h3 gray_t\"><img src=\"images/index_ico2.gif\" class=\"img\" />公司概况");
                sb.AppendLine("<div class=\"more font12\"></div>");
                sb.AppendLine("</div>");
                sb.AppendLine("<div class=\"gg_ly_l3_c\">");
                sb.AppendLine("<table width=\"743\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
                sb.AppendLine("  <tr>");
                sb.AppendFormat("    <td width=\"220\" rowspan=\"4\">所属行业：<a href=\"bk{1}.shtml\" class=\"b\">{0}</a>（行业板块中流通市值排名<span class=\"red\">{2}</span>位，总市值排名<span class=\"red\">{3}</span>位)<br />", obj.bkName, obj.bkid, obj.bkph, obj.ph);
                sb.AppendLine("      所属概念：<br /><div class=\"glbk\"><ul>");
                List<GLBK> lst = obj.gnBk;
                foreach (var m in lst)
                {
                    if (m.bkid.Substring(0, 3) == "002")
                        sb.AppendFormat("<li><a href=\"bk{1}.shtml\" class=\"b\">{0}</a></li>", m.bkName, m.bkid);
                    else
                        sb.AppendFormat("<li><span class=\"blue\">{0}</span></li>", m.bkName);
                }
                sb.AppendFormat("    </ul></div></td><td height=\"25\">所属地区：{0}</td>", OTO.ToStr(obj.Dq, "-"));
                sb.AppendFormat("    <td>总股本(亿)：{0}</td>", OTO.CoUt(obj.Zgb, 1, "-", 2));
                sb.AppendFormat("    <td class=\"right\">每股收益(元)：{0}</td>", OTO.CoUt(obj.Mgsy, 1, "-", 2));
                sb.AppendLine("  </tr>");
                sb.AppendLine("  <tr>");
                sb.AppendFormat("    <td height=\"25\">上市时间：{0}</td>", OTO.ToDate(obj.Sssj, "yyyy-MM-dd", "-"));
                sb.AppendFormat("    <td>流通A股(亿)：{0}</td>", OTO.CoUt(obj.Ltag, 1, "-", 2));
                sb.AppendFormat("    <td class=\"right\">每股净资产(元)：{0}</td>", OTO.CoUt(obj.Mgjzc, 1, "-", 2));
                sb.AppendLine("  </tr>");
                sb.AppendLine("  <tr>");
                sb.AppendFormat("    <td height=\"25\">每股现金流(元)：{0}</td>", OTO.CoUt(obj.Mgxjl, 1, "-", 2));
                sb.AppendFormat("    <td>每股公积金(元)：{0}</td>", OTO.CoUt(obj.Mggjj, 1, "-", 2));
                sb.AppendFormat("    <td class=\"right\">净资产收益率(%)：{0}</td>", OTO.CoUt(obj.Jzcsyl, 1, "-", 2));
                sb.AppendLine("  </tr>");
                sb.AppendLine("  <tr>");
                sb.AppendFormat("    <td height=\"25\">净利润增长率(%)：{0}</td>", OTO.CoUt(obj.Jlrzzl, 1, "-", 2));
                sb.AppendFormat("    <td>每股未分配利润：{0}</td>", OTO.CoUt(obj.Mgwfplr, 1, "-", 2));
                sb.AppendFormat("    <td class=\"right\">主营收入增长率(%)：{0}</td>", obj.Zysrzzl);
                sb.AppendLine("  </tr>");
                sb.AppendLine("</table>");
                sb.AppendLine("</div>");
            }
        }
        catch
        {
            sb = new StringBuilder();
        }
        return sb;
    }
}